import json
# from main.dbs.result_db import *
import xlwt

def write():
    f = open('data.json', 'w')
    dic = {}
    dic['buy'] = 12
    # res = Result(cost=0, price=0, repurchase=0, mean=0, variance=0)
    # print(res.to_json())
    # json.dump(res.to_json(), f)


def read():
    f = open('data.json', 'r')
    dic = json.load(f)
    print(type(dic))
    print(dic)

if __name__ == '__main__':
    import numpy as np
    need = [1,0,0]
    print(round(np.mean(need), 2))

